import pandas as pd
df = pd.read_csv('./mnist_data/mnist_train.csv',header=None)
num_rows = len(df)
print(num_rows)

import matplotlib.pyplot as plt
row = 27
data = df.iloc[row]
label = data[0]
img = data[1:].values.reshape(28,28)

plt.title(f"label={label}")
plt.imshow(img,interpolation="none",cmap='Blues')
plt.show()